<?php
	function __autoload($class_name)
	{
		include_once('../classes/'.strtolower($class_name).'.php');
	}
    
    $Loi = false;
	$TenDonViTinh = $_POST['TenDonViTinh'];
		    
    $donvitinh = new donvitinhbs();
    $donvitinh->TenDonViTinh = $TenDonViTinh;
    $isset = $donvitinh->issetType();
    
    if($isset[0]['SoDong'] > 0)
        $Loi = true;
    
    if($Loi == false)
    {
        if($donvitinh->add())
            echo "yes";
        else
            echo "no";
    }
    else
    {
        echo "no";
    }
?>